Control flow based type analysis